package com.sky.mineralmm.system.controller;

import com.sky.mineralmm.system.entity.SystemUser;
import com.sky.mineralmm.system.service.SystemUserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/systemUser")
public class SystemUserController {
    @Autowired
    private SystemUserService systemUserService;

    @RequestMapping("/insert")
    public int insert(SystemUser entity) {
        return systemUserService.insert(entity);
    }

    @RequestMapping("/deleteByPrimaryKey")
    public int deleteByPrimaryKey(Long id) {
        return systemUserService.deleteByPrimaryKey(id);
    }

    @RequestMapping("/updateByPrimaryKey")
    public int updateByPrimaryKey(SystemUser record) {
        return systemUserService.updateByPrimaryKey(record);
    }

    @RequestMapping("/selectAll")
    public List<SystemUser> selectAll() {
        return systemUserService.selectAll();
    }
}